package com.situ.study.day9;

import com.situ.study.day9.cal.Add;
import com.situ.study.day9.cal.Cal;
import com.situ.study.day9.cal.Sub;
import org.junit.Test;

public class Demo {

    @Test
    public void test1() {
        Student student = new Student(1, "zhansgan", 23);
        System.out.println(student.toString());
        System.out.println(student);
    }

    @Test
    public void test2() {
        Add add = new Add(3, 5);
        int result = add.getResult();
        System.out.println(result);
    }

    @Test
    public void test3() {
        Cal cal = new Add(3, 5);
        int result = cal.getResult();
        System.out.println(result);

        cal = new Sub(3, 2);
        int result2 = cal.getResult();
        System.out.println(result2);
    }

    @Test
    public void test5() {
        //'Teacher' is abstract; cannot be instantiated
        //Teacher teacher = new Teacher();
    }
}
